package howToPrograming;
public class Cylinder extends Circle
{
	protected int height;

	public Cylinder()
	{
		setHeight(0);
	}

	public Cylinder(int h, int r, int a, int b)
	{
		super(r, a, b);
		setHeight(h);
	}

	public String getName()
	{
		return "Cylinder";
	}

	public String toString()
	{
		return super.toString() + ";Height = " + getHeight();
	}

	public double area()
	{
		return 2 * super.area() + 2 * Math.PI * getRadius() * getHeight();
	}

	public double volume()
	{
		return super.area() * getHeight();
	}

	public int getHeight()
	{
		return height;
	}

	public void setHeight(int height)
	{
		this.height = height;
	}

}
